package service;

import dao.IMovieDao;
import dao.MovieDaoImpl;
import entity.Movie;

import java.util.List;

public class MovieServiceImpl implements IMovieService {
    private IMovieDao movieDao = new MovieDaoImpl();

    @Override
    public boolean addMovie(Movie movie) {
        return movieDao.addMovie(movie);
    }

    @Override
    public boolean deleteMovie(String movieId) {
        return movieDao.deleteMovie(movieId);
    }

    @Override
    public boolean updateMovie(Movie movie) {
        return movieDao.updateMovie(movie);
    }

    @Override
    public Movie getMovieById(String movieId) {
        return movieDao.getMovieById(movieId);
    }

    @Override
    public List<Movie> getAllMovies() {
        return movieDao.getAllMovies();
    }

    @Override
    public List<Movie> searchMovies(String name, String director, String stars) {
        return movieDao.searchMovies(name, director, stars);
    }
}